Skip to content

chore(deps): upgrade Wagtail from 7.3.4 to 8.1 - #262

Merged
matrixise merged 1 commit into
masterfrom
chore/wagtail-8.1
Nov 21, 2026
Merged

matrixise merged 1 commit into
masterfrom
chore/wagtail-8.1

Conversation

@matrixise

@matrixise matrixise commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Why

Wagtail 7.3 is no longer maintained: the 2026-10-20 security release shipped fixes for 7.0.10 (LTS), 7.4.4 and 8.0.1 only, so 7.3.4 stays vulnerable to:

Advisory Severity Summary
GHSA-4pg7-87vv-vrh7 high Stored XSS via v3 write API and third-party HTML editors
GHSA-3xgh-xc8p-9h54 medium Improper restriction handling on Pages admin API for ancestor pages
GHSA-g6cr-c9h3-6j2m medium Formula injection via XLSX export
GHSA-jm43-45cc-q9rr medium Cross-collection authorization bypass via collection privacy settings

These advisories are not in the global GitHub Advisory Database yet, which is why Dependabot raised no alert.

Changes

  • pyproject.toml: wagtail>=8.1,<8.2
  • uv.lock: wagtail 8.1, draftjs-exporter 5.2.0 → 7.3.1, modelsearch 1.2.2 → 1.3.2, new django-ninja 1.8.0 and swapper 1.5.0
  • README / CLAUDE.md / DEVELOPMENT.md: Wagtail version updated

Upgrade considerations reviewed (7.4, 8.0, 8.1)

None of the removed or changed APIs are used by this project (userbar hooks, TAG_LIMIT, wagtail.telepath, listing buttons, WAGTAILSEARCH_BACKENDS["INDEX"], viewsets, ajax_template, internal /admin/api/main/, i18n sitemaps). Our templates write their own block-* classes, so the new w-block-* prefix does not affect them.

Possible visible changes:

  • AVIF/WebP images are no longer converted to PNG on rendition (8.0).
  • draftjs-exporter major bump may slightly change rich-text HTML on re-save.

Tests

  • manage.py check: no issues
  • makemigrations --check: no changes
  • Test suite: 7 tests OK

The test suite does not cover the admin or page rendering, so manual testing is required before merging.

Manual test plan

  • docker build then migrate on a synthetic database populated under Wagtail 7.3.4
  • migrate on a copy of the production database (task database:pull), not done: Heroku CLI unavailable locally
  • collectstatic --clear --noinput, then hard-refresh the browser
  • Admin login, page explorer navigation (new explorer API in 8.1)
  • Edit and publish a page with rich text
  • Home page and a few simple pages render correctly
  • Meetup and sponsor snippets in the admin

🤖 Generated with Claude Code

The 7.3 branch is no longer maintained and is affected by security
advisories that are only fixed in 7.0.10, 7.4.4 and 8.0.1+:

- GHSA-4pg7-87vv-vrh7 (high): stored XSS via v3 write API
- GHSA-3xgh-xc8p-9h54: Pages admin API ancestor restrictions
- GHSA-g6cr-c9h3-6j2m: formula injection via XLSX export
- GHSA-jm43-45cc-q9rr: cross-collection authorization bypass

Lock changes: wagtail 8.1, draftjs-exporter 5.2.0 -> 7.3.1,
modelsearch 1.2.2 -> 1.3.2, new django-ninja and swapper.

Update the Wagtail version mentioned in the docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matrixise

Copy link
Copy Markdown
Contributor Author

Local test results

The upgrade was tested end to end on a disposable PostgreSQL 17 database. It was populated under Wagtail 7.3.4, then migrated with this branch. The server ran with DEBUG=False (production-like) and the admin was driven with a headless Chromium (Playwright).

Test data: 5 pages (home, nested HomePage, SimplePages, one unpublished draft), rich text with bold/italic/external, page and document links, lists and an embedded image, PNG and WebP images, a document, a PageSegment, a Meetup, a sponsor with a sponsorship level, and a redirect.

Check Result
docker build ✅ image contains Wagtail 8.1 / Django 6.0.8
migrate on a 7.3.4 database ✅ wagtailadmin.0006_formstate, wagtailcore.0098_apitoken, wagtailsearch.0010_add_text_fields applied; no missing project migrations
collectstatic --clear --noinput ✅ 254 files copied
manage.py check ✅ no issues
Admin login ✅
Page explorer (new /admin/api/explorer/ endpoint) ✅ 200 responses, tree navigation works
Edit rich text on an existing page and publish ✅ new text (including bold) visible on the public page
Create a new page with rich text and publish ✅
Preview, revision history, unpublished draft ✅
PageSegment and Meetup snippets: open and save ✅
Images, documents, sites, users, redirects ✅
Django admin (sponsors) ✅
Public pages: home, nested pages, redirect, 404 ✅ HTML byte-identical to the 7.3.4 rendering

No 4xx/5xx responses from the application and no tracebacks in the server log.

Notes

  • registerHalloPlugin is not defined JS error in admin editors: it already exists on 7.3.4 and is fixed by chore(core): remove dead Hallo.js editor hooks #263.
  • WebP: new renditions are now generated as WebP (e.g. banner-webp.width-100.webp), as documented in 8.0. Existing PNG renditions keep being served, so already published pages are unchanged.
  • /favicon.ico 404 and axe.run console messages (Wagtail userbar accessibility checker, logged-in users only) are unrelated to this upgrade.

Not covered

  • A copy of the production database: the Heroku CLI was not available locally. Running task database:pull and the migrations on it remains a good final check.
  • After deploying, run task heroku:migrate.

🤖 Generated with Claude Code

@matrixise
matrixise merged commit 30a5d4a into master Nov 21, 2026
4 checks passed
@matrixise
matrixise deleted the chore/wagtail-8.1 branch November 21, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant